<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cherry.js</title>
    <script src="../../Cherry.js"></script>

</head>
<body>
    <div id="app"></div>
</body>
<script>

    new CherryMain({
        app:"app",
        child:[
            new CHE_Checkbox({
                name:"Checkbox1",
                text:"CHE_Checkbox1",
                form:"CHE_Checkbox",
            }),
            new CHE_Checkbox({
                text:"CHE_Checkbox2",
                form:"CHE_Checkbox",
            }),
            new CHE_Container({
                height:20
            }),
            new CHE_Button({
                margin:5,
                text:"获取值",
                methods:{
                    click:(e,self)=>{
                        console.log($GET("#Checkbox1").getValue());
                    }
                }
            }),
            new CHE_Button({
                margin:5,
                text:"设置值",
                cookie:true,
                methods:{
                    click:(e,self)=>{
                        $GET("#Checkbox1").setValue(self.getCookie());
                        self.setCookie(!self.getCookie());
                    }
                }
            }),
        ],
        Created:()=>{

        }
    });



</script>
</html>